
import { useState } from "react";

export const useAuthMenu = () => {
    const [isModalOpen, setIsModalOpen] = useState(false);
    const [roleId, setRoleId] = useState('')
    const [roleName, setRoleName] = useState('')
    const close = () => {
        setIsModalOpen(false)
    };
    const openOptionDialog = (id:string,name:string) => {
        setRoleId(id)
        setRoleName(name)
        setIsModalOpen(true)
    }
    return {
        roleId,
        roleName,
        isModalOpen,
        setIsModalOpen,
        close,
        openOptionDialog
    }
}